package com.celestial.Repository;

import com.celestial.Domain.PO.*;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LabelsRepository extends Neo4jRepository<Person, Long> {
    @Query("MATCH (n)\n" +
            "UNWIND labels(n) AS label\n" +
            "RETURN DISTINCT label")
    List<String> getAllLabels();
}
